gtk4.git
4 years agoAdd gsk_transform_to_2d_components
Matthias Clasen [Sat, 18 Sep 2021 06:06:00 +0000 (02:06 -0400)]
Add gsk_transform_to_2d_components

This function decomposes a general 2D transform
into skew, scale, rotation and translation.

Tests included.

4 years agoAdd more transform tests
Matthias Clasen [Sat, 18 Sep 2021 02:37:08 +0000 (22:37 -0400)]
Add more transform tests

Test gsk_transform_to_2d.

4 years agogsk: Add skew transforms
Matthias Clasen [Sat, 18 Sep 2021 02:01:55 +0000 (22:01 -0400)]
gsk: Add skew transforms

Add gsk_transform_skew() to make our transform
api more complete wrt to what you would expect
for a graphics api.

4 years agotransform: Add sections
Matthias Clasen [Sat, 18 Sep 2021 00:51:47 +0000 (20:51 -0400)]
transform: Add sections

This makes the code easier to navigate (for me).

4 years agoMerge branch 'glyph-clipping-fixes' into 'master'
Matthias Clasen [Fri, 17 Sep 2021 18:35:41 +0000 (18:35 +0000)]
Merge branch 'glyph-clipping-fixes' into 'master'

gsk: Stop enlarging text bounding boxes

See merge request GNOME/gtk!3968

4 years agoMerge branch 'wip/otte/for-master' into 'master'
Matthias Clasen [Fri, 17 Sep 2021 18:06:30 +0000 (18:06 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

icontheme: Fix variable mixup leading to crashes

Closes #4269

See merge request GNOME/gtk!3967

4 years agoicontheme: Fix variable mixup leading to crashes
Benjamin Otte [Fri, 17 Sep 2021 16:51:59 +0000 (18:51 +0200)]
icontheme: Fix variable mixup leading to crashes

Note: Don't have 2 variables named "icon" and "gicon", you will screw
them up.

reftests included.

Fixes #4269

4 years agoFix glyph cache entry sizing
Matthias Clasen [Fri, 17 Sep 2021 17:17:53 +0000 (13:17 -0400)]
Fix glyph cache entry sizing

The subpixel-positioned glyph extends on both sides.

4 years agoMerge branch 'menu_button_a11y_improvements' into 'master'
Matthias Clasen [Fri, 17 Sep 2021 16:51:52 +0000 (16:51 +0000)]
Merge branch 'menu_button_a11y_improvements' into 'master'

Set correct accessible relations for GtkMenuButton

Closes #4254

See merge request GNOME/gtk!3950

4 years agogsk: Stop enlarging text bounding boxes
Matthias Clasen [Fri, 17 Sep 2021 16:37:36 +0000 (12:37 -0400)]
gsk: Stop enlarging text bounding boxes

This should not be necessary and only serves
to make the actual bugs harder to find.

4 years agoApply 4 suggestion(s) to 1 file(s)
Emmanuele Bassi [Fri, 17 Sep 2021 16:26:00 +0000 (16:26 +0000)]
Apply 4 suggestion(s) to 1 file(s)

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 17 Sep 2021 16:22:04 +0000 (16:22 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

gsk: Add a test for transform_bounds

See merge request GNOME/gtk!3966

4 years agotestsuite: Run the clipboard test in isolation
Matthias Clasen [Fri, 17 Sep 2021 15:24:54 +0000 (11:24 -0400)]
testsuite: Run the clipboard test in isolation

We can't have other test pop up windows, and possibly
stealing focus and preventing us from getting data
offers. So, run the clipboard test in isolation.

4 years agotransform: Improve docs
Matthias Clasen [Fri, 17 Sep 2021 13:57:07 +0000 (09:57 -0400)]
transform: Improve docs

Add an example for reconstructing transforms.

4 years agogsk: Handle 2D transforms better
Matthias Clasen [Fri, 17 Sep 2021 13:42:20 +0000 (09:42 -0400)]
gsk: Handle 2D transforms better

For 2D transforms, we can read the scale
factors more directly off the matrix.

This should eventually be moved out into a
function to decompose a 2D transform into
scale + rotation + skew + translation.

4 years agonode editor: Preserve aspect ratio
Matthias Clasen [Fri, 17 Sep 2021 13:29:55 +0000 (09:29 -0400)]
node editor: Preserve aspect ratio

We don't want to distort our rendering.
Tell the paintable to keep the aspect
ratio.

4 years agorendernodepaintable: Provide accurate aspect ratio
Matthias Clasen [Fri, 17 Sep 2021 13:28:12 +0000 (09:28 -0400)]
rendernodepaintable: Provide accurate aspect ratio

Since we report width and height as integers, the
default implementation of this introduces rounding
errors. This shows up in the node-editor, as having
uneven scale factors like sx=1.0 and sy=1.0035.
Text nodes don't handle uneven scales like that well
and overdraw.

4 years agoDelete unneccessary comment and make other more descriptive
Lukáš Tyrychtr [Fri, 17 Sep 2021 13:11:26 +0000 (15:11 +0200)]
Delete unneccessary comment and make other more descriptive

4 years agogsk: Add a test for transform_bounds
Matthias Clasen [Fri, 17 Sep 2021 11:43:07 +0000 (07:43 -0400)]
gsk: Add a test for transform_bounds

4 years agoMerge branch 'fix-typo' into 'master'
Matthias Clasen [Fri, 17 Sep 2021 10:52:59 +0000 (10:52 +0000)]
Merge branch 'fix-typo' into 'master'

gtkcolorbutton: Fix documentation

See merge request GNOME/gtk!3965

4 years agogtkcolorbutton: Fix documentation
James Westman [Fri, 17 Sep 2021 04:53:42 +0000 (23:53 -0500)]
gtkcolorbutton: Fix documentation

4 years agoMerge branch 'image-loading' into 'master'
Benjamin Otte [Fri, 17 Sep 2021 03:13:38 +0000 (03:13 +0000)]
Merge branch 'image-loading' into 'master'

Image loaders

See merge request GNOME/gtk!3939

4 years agogtk-demo: Use textures in listbox example
Benjamin Otte [Fri, 17 Sep 2021 02:15:40 +0000 (04:15 +0200)]
gtk-demo: Use textures in listbox example

4 years agoexamples: Use textures over pixbufs
Benjamin Otte [Fri, 17 Sep 2021 02:10:56 +0000 (04:10 +0200)]
examples: Use textures over pixbufs

4 years agoicontheme: Implement gtk_icon_theme_lookup_by_gicon() for textures
Benjamin Otte [Fri, 17 Sep 2021 02:07:59 +0000 (04:07 +0200)]
icontheme: Implement gtk_icon_theme_lookup_by_gicon() for textures

More feature parity.

Before this, it would have worked just as well - just going via a PNG
bytes step inbetween.

4 years agotexture: Implement GIcon and GLoadableIcon
Benjamin Otte [Fri, 17 Sep 2021 02:05:40 +0000 (04:05 +0200)]
texture: Implement GIcon and GLoadableIcon

This is mainly for feature parity with GdkPixbuf. And it doesn't hurt
anyone (I hope).

4 years agotexture: Refactor gdk_texture_new_from_bytes()
Benjamin Otte [Fri, 17 Sep 2021 01:42:27 +0000 (03:42 +0200)]
texture: Refactor gdk_texture_new_from_bytes()

1. Split into a real loader and a fake one

2. Only try the fake one if the real one doesn't support the file.

4 years agotexture: Rework error enum
Benjamin Otte [Fri, 17 Sep 2021 01:25:35 +0000 (03:25 +0200)]
texture: Rework error enum

1. Change INSUFFICIENT_MEMORY to TOO_LARGE
   GTK crashes on insufficient memory, we don't emit GErrors.

2. Split UNSUPPORTED into UNSUPPORTED_CONTENT and UNSUPPORTED_FORMAT
   So we know if you need to find an RPM with a loader or curse and
   the weird file.

3. Translate error messages, they are meant for end users.

4 years agopixbufutils: Don't hardcode formats
Benjamin Otte [Fri, 17 Sep 2021 00:34:15 +0000 (02:34 +0200)]
pixbufutils: Don't hardcode formats

Just let the loaders figure out the file format themselves.

4 years agoicontheme: Insist that people provide proper values
Benjamin Otte [Fri, 17 Sep 2021 00:29:59 +0000 (02:29 +0200)]
icontheme: Insist that people provide proper values

Seriously...

4 years agoicontheme: Use textures more
Benjamin Otte [Tue, 14 Sep 2021 16:17:58 +0000 (18:17 +0200)]
icontheme: Use textures more

We were going via GLoadablieIcon/GInputStream for everything previously
and we have no API for that with GdkTexture.

With this commit, gdk-pixbuf isn't used anymore when starting
widget-factory for anything but SVG.

4 years agoicontheme: Load textures directly when possible
Benjamin Otte [Tue, 14 Sep 2021 15:49:40 +0000 (17:49 +0200)]
icontheme: Load textures directly when possible

This doesn't fix the codepaths for SVG (both for recoloring and
resizing) and doesn't handle streams yet.

4 years agoSupport 16bit formats in the png loader
Matthias Clasen [Wed, 15 Sep 2021 04:41:40 +0000 (00:41 -0400)]
Support 16bit formats in the png loader

When loading, convert all >8-bit data to
GDK_MEMORY_R16G16B16A16_PREMULTIPLIED.

When saving, save all 8-bit formats as 8-bit RGBA,
and save all >8-bt formats as 16-bit RGBA.

4 years agocontentdeserializer: Use our on jpeg loader
Matthias Clasen [Tue, 14 Sep 2021 21:46:11 +0000 (17:46 -0400)]
contentdeserializer: Use our on jpeg loader

4 years agoAdd code to save jpegs
Matthias Clasen [Tue, 14 Sep 2021 21:40:29 +0000 (17:40 -0400)]
Add code to save jpegs

4 years agobuilder: Stop using pixbufutils
Matthias Clasen [Tue, 14 Sep 2021 19:17:29 +0000 (15:17 -0400)]
builder: Stop using pixbufutils

We can just use gdk_pixbuf_new_from_resource here.

4 years agocssimageurl: Just create a texture directly
Matthias Clasen [Tue, 14 Sep 2021 19:12:39 +0000 (15:12 -0400)]
cssimageurl: Just create a texture directly

We don't need to use the pixbufutils api here.

4 years agobuilder: create textures without pixbufs
Matthias Clasen [Tue, 14 Sep 2021 18:55:59 +0000 (14:55 -0400)]
builder: create textures without pixbufs

Load textures using the GdkTexture apis, without
going through a pixbuf first.

4 years agotexture: Add private can_load() function
Benjamin Otte [Tue, 14 Sep 2021 15:40:09 +0000 (17:40 +0200)]
texture: Add private can_load() function

... and use it to load textures in gtk_picture_set_from_file().

4 years agotexture: Split out type detection
Benjamin Otte [Tue, 14 Sep 2021 15:03:49 +0000 (17:03 +0200)]
texture: Split out type detection

This way, the code using it becomes clearer and we can use it in
multiple places without accidentally doing it wrong (hint: see next
commit).

4 years agotexture: Remove declaration for nonexisting function
Benjamin Otte [Tue, 14 Sep 2021 14:26:05 +0000 (16:26 +0200)]
texture: Remove declaration for nonexisting function

4 years agotexture: Avoid pixbufs when loading resources
Matthias Clasen [Tue, 14 Sep 2021 12:52:35 +0000 (08:52 -0400)]
texture: Avoid pixbufs when loading resources

We can just use our own loaders here now.

4 years agotestsuite: Add png and tiff methods
Benjamin Otte [Tue, 14 Sep 2021 00:37:50 +0000 (02:37 +0200)]
testsuite: Add png and tiff methods

We encode the texture to a PNG or TIFF and then decode
it again, in various ways.

4 years agotexture: Add gdk_texture_save_to_tiff_bytes()
Benjamin Otte [Tue, 14 Sep 2021 00:36:56 +0000 (02:36 +0200)]
texture: Add gdk_texture_save_to_tiff_bytes()

4 years agorendernodeparser: Avoid gdk_texture_new_for_pixbuf
Matthias Clasen [Mon, 13 Sep 2021 23:36:17 +0000 (19:36 -0400)]
rendernodeparser: Avoid gdk_texture_new_for_pixbuf

We can just use gdk_texture_new_from_bytes here now.

Update affected test output.

4 years agorendernodeparser: Use gdk_texture_save_to_png_bytes
Matthias Clasen [Mon, 13 Sep 2021 18:59:20 +0000 (14:59 -0400)]
rendernodeparser: Use gdk_texture_save_to_png_bytes

Avoid cairo, and use our own api for saving png data.

Update affected test output.

4 years agoAdd contentserializer tests for textures
Matthias Clasen [Sun, 12 Sep 2021 01:38:31 +0000 (21:38 -0400)]
Add contentserializer tests for textures

4 years agoUse our own loaders for content (de)serialization
Matthias Clasen [Fri, 10 Sep 2021 02:23:37 +0000 (22:23 -0400)]
Use our own loaders for content (de)serialization

Use our own loader to (de)serialiaze textures
to and from png and tiff.

We still fall back to gdk-pixbuf for handling all
the other image formats, and for pixbufs.

4 years agoAdd tests for the jpeg loader
Matthias Clasen [Sun, 12 Sep 2021 03:28:06 +0000 (23:28 -0400)]
Add tests for the jpeg loader

4 years agoLoad jpegs without gdk-pixbuf
Matthias Clasen [Sat, 11 Sep 2021 21:02:41 +0000 (17:02 -0400)]
Load jpegs without gdk-pixbuf

Use our own loader for jpeg files.

4 years agoAdd code to load jpegs
Matthias Clasen [Tue, 14 Sep 2021 11:48:49 +0000 (07:48 -0400)]
Add code to load jpegs

This lets us avoid gdk-pixbuf for loading
textures from the common image formats.

As a consequence, we are now linking against libjpeg.

4 years agoAdd gdk_texture_save_to_tiff
Matthias Clasen [Tue, 7 Sep 2021 13:20:05 +0000 (09:20 -0400)]
Add gdk_texture_save_to_tiff

This is a companion to gdk_texture_save_to_png, using
the tiff format, which will let us avoid lossy conversion
of HDR data, since we can store floating point data.

4 years agoAdd tests for the tiff loader
Matthias Clasen [Sun, 12 Sep 2021 05:07:16 +0000 (01:07 -0400)]
Add tests for the tiff loader

4 years agoLoad tiffs without gdk-pixbuf
Matthias Clasen [Sat, 11 Sep 2021 20:30:37 +0000 (16:30 -0400)]
Load tiffs without gdk-pixbuf

This will let us load floating point data, in
the future.

4 years agoAdd code to load and save tiff files
Matthias Clasen [Fri, 10 Sep 2021 16:47:14 +0000 (12:47 -0400)]
Add code to load and save tiff files

Add support for the tiff format, which is flexible
enough to handle all our memory texture formats
without loss.

As a consequence, we are now linking against libtiff.

4 years agoAdd gdk_texture_save_to_png_bytes
Matthias Clasen [Mon, 13 Sep 2021 18:29:31 +0000 (14:29 -0400)]
Add gdk_texture_save_to_png_bytes

Just expose what we already have available
internally, so e.g. tests can use it without
static linking.

4 years agoAdd tests for the png loader
Matthias Clasen [Sun, 12 Sep 2021 00:27:13 +0000 (20:27 -0400)]
Add tests for the png loader

4 years agoSave pngs without cairo
Matthias Clasen [Sun, 12 Sep 2021 13:24:59 +0000 (09:24 -0400)]
Save pngs without cairo

Use our own loader for pngs, which will allow
us to save e.g. 16-bit data in the future.

4 years agoLoad pngs without gdk-pixbuf
Matthias Clasen [Sat, 11 Sep 2021 20:23:53 +0000 (16:23 -0400)]
Load pngs without gdk-pixbuf

Use our own loader for pngs, which will allow
us to get e.g. 16-bit data in the future.

4 years agoAdd code to load and save pngs
Matthias Clasen [Fri, 10 Sep 2021 16:44:43 +0000 (12:44 -0400)]
Add code to load and save pngs

Using libpng instead of the lowest-common-denominator
gdk-pixbuf loader. This will allow us to load >8bit data,
and apply gamma and color correction in the future.
For now, this still just provides RGBA8 data.

As a consequence, we are now linking against libpng.

4 years agotexture: Add error enum
Matthias Clasen [Tue, 14 Sep 2021 00:51:42 +0000 (20:51 -0400)]
texture: Add error enum

4 years agoMerge branch 'modern-testsuite' into 'master'
Benjamin Otte [Thu, 16 Sep 2021 22:22:56 +0000 (22:22 +0000)]
Merge branch 'modern-testsuite' into 'master'

testsuite: modernize image handling

Closes #4261

See merge request GNOME/gtk!3955

4 years agoreftests: Use the default (aka NGL) renderer
Benjamin Otte [Wed, 15 Sep 2021 14:47:09 +0000 (16:47 +0200)]
reftests: Use the default (aka NGL) renderer

All tests pass with the renderer now, so we can remove useof the
fallback.

4 years agoreftests: XFAIL border-half-pixel test
Benjamin Otte [Thu, 16 Sep 2021 18:41:25 +0000 (20:41 +0200)]
reftests: XFAIL border-half-pixel test

the GL renderer can't deal with non-integers

4 years agoreftests: Use colors without rounding errors
Benjamin Otte [Thu, 16 Sep 2021 18:26:26 +0000 (20:26 +0200)]
reftests: Use colors without rounding errors

Color values must be divisible by 15 to be convertible into U8 and U16
values with the same result. 0x80 is not one of these values, so switch
it to 0x99.

4 years agorendernodeparser: Handle is_color attribute for glyphs
Benjamin Otte [Thu, 16 Sep 2021 05:39:21 +0000 (07:39 +0200)]
rendernodeparser: Handle is_color attribute for glyphs

4 years agongl: Avoid offscreens in more cases
Matthias Clasen [Thu, 16 Sep 2021 12:05:21 +0000 (08:05 -0400)]
ngl: Avoid offscreens in more cases

We avoid an offscreen if we know the child node
can 'handle' the transform. Shadow nodes can if their
child node does - either the child node is a text node
in which case the shortcuts we take for shadow nodes
will work fine with the transform (we just render the
text node offset), or the child is not a text node,
in which case we render the shadow to an offscreen
anyway.

This change makes the label-shadows reftest pass with
the GL renderer, not by fixing the issue but by avoiding
it.

4 years agongl: Improve shortcuts for shadow nodes
Matthias Clasen [Thu, 16 Sep 2021 12:04:09 +0000 (08:04 -0400)]
ngl: Improve shortcuts for shadow nodes

For shadow nodes, we try pretty hard to avoid
rendering shadows, and and we have a shortcut
that just renders text offset, but we can try
harder to do nothing - if the text is offset
by zero, we don't need to draw it at all.

4 years agongl Fix bottom-right border render failure
Benjamin Otte [Thu, 16 Sep 2021 00:28:56 +0000 (02:28 +0200)]
ngl Fix bottom-right border render failure

The wrong index was used for offsetting the bottom border rect.

Test included.

4 years agotestsuite: Switch color from khaki to yellow
Benjamin Otte [Wed, 15 Sep 2021 21:32:22 +0000 (23:32 +0200)]
testsuite: Switch color from khaki to yellow

llvmpipe doesn't loike compositing semitransparent khaki onto solid
khaki without rounding errors.

4 years agoreftests: Make image-compare use textures
Benjamin Otte [Wed, 15 Sep 2021 20:54:14 +0000 (22:54 +0200)]
reftests: Make image-compare use textures

All image comparisons are done on textures now.

4 years agoreftests: Use 0.6 instead of 0.5 for alpha
Benjamin Otte [Wed, 15 Sep 2021 20:37:56 +0000 (22:37 +0200)]
reftests: Use 0.6 instead of 0.5 for alpha

See previous commit about rounding

4 years agoreftests: Use 0.6 alpha, not 0.5
Benjamin Otte [Wed, 15 Sep 2021 20:32:12 +0000 (22:32 +0200)]
reftests: Use 0.6 alpha, not 0.5

0.5 leads to some GL renderers computing 0.5 * 0xFF as 0x7F and
others 0x80, while 0.6 * 0xFF (255 is divisible by 5) is always 0x99.

4 years agotestsuite: Port compare_render() to use textures
Benjamin Otte [Wed, 15 Sep 2021 20:13:57 +0000 (22:13 +0200)]
testsuite: Port compare_render() to use textures

4 years agotests: Update rendernode test to use textures
Benjamin Otte [Wed, 15 Sep 2021 15:21:24 +0000 (17:21 +0200)]
tests: Update rendernode test to use textures

4 years agotestuite: Add opacity-overdraw test
Benjamin Otte [Wed, 15 Sep 2021 05:37:57 +0000 (07:37 +0200)]
testuite: Add opacity-overdraw test

Tests that overdrawing of content inside an opacity node happens before
the opacity is applied.

This is broken in the GL renderer and causes the opacity.ui reftest to
fail.

4 years agongl: Fix opacity handling
Matthias Clasen [Wed, 15 Sep 2021 12:26:54 +0000 (08:26 -0400)]
ngl: Fix opacity handling

We need to use an offscreen whenever there is overlapping
children somewhere in the tree below, just checking the
direct child of the opacity node is not enough.

Fixes: #4261
4 years agoreftests: Use GdkTexture instead of cairo_surface_t
Benjamin Otte [Wed, 15 Sep 2021 04:55:25 +0000 (06:55 +0200)]
reftests: Use GdkTexture instead of cairo_surface_t

This also switches the rendering code from using gsk_render_node_draw()
to gsk_renderer_render_texture().

Some tests are broken with the GL renderer, so this patch forces the
Cairo renderer until they get fixed.

4 years agoreftests: Make diff pixels always opaque
Benjamin Otte [Wed, 15 Sep 2021 14:39:09 +0000 (16:39 +0200)]
reftests: Make diff pixels always opaque

We had pixels that did not differ in alpha and we then set 0 alpha
difference hich made the pixel invisible. Oops.

4 years agotestsuite: remove box-order test
Benjamin Otte [Wed, 15 Sep 2021 04:53:15 +0000 (06:53 +0200)]
testsuite: remove box-order test

The test used to test that GtkBox ordered it's children left-to-right in
CSS, no matter the text direction or pack-type.

But there is neither a pack-type anymore nor does GTK4 do that.

So that test has been broken for yers, it just didn't render anything
wrong.

4 years agoAPI: Add gdk_texture_new_from_filename()
Benjamin Otte [Wed, 15 Sep 2021 20:08:33 +0000 (22:08 +0200)]
API: Add gdk_texture_new_from_filename()

There are quite a few places where we can make use of it, in particular
in the testsuite and icontheme.

4 years agotestsuite: Fix race in texture-threads test
Benjamin Otte [Thu, 16 Sep 2021 21:56:41 +0000 (23:56 +0200)]
testsuite: Fix race in texture-threads test

Threads are evil, yo.

4 years agogltexture: Fallback in download_float()
Benjamin Otte [Thu, 16 Sep 2021 21:30:37 +0000 (23:30 +0200)]
gltexture: Fallback in download_float()

GLES only allows downloading float if the texture matches specific
criteria and I'm too lazy to determine them, so always fall back.

And the custom stride fallback code isn't necessary, because falling
back does exactly that step already.

4 years agogltexture: Fix download() for GLES
Benjamin Otte [Thu, 16 Sep 2021 21:14:59 +0000 (23:14 +0200)]
gltexture: Fix download() for GLES

GLES can't do glGetTexImage(), so implement a version that does
glReadPixels() on GLES.

4 years agotestsuite: Be more verbose in texture-threads test
Benjamin Otte [Thu, 16 Sep 2021 19:49:50 +0000 (21:49 +0200)]
testsuite: Be more verbose in texture-threads test

The test randomly fails on CI, so try to be more helpful in debugging
them.

4 years agoMerge branch 'master' into 'master'
Matthias Clasen [Thu, 16 Sep 2021 18:32:23 +0000 (18:32 +0000)]
Merge branch 'master' into 'master'

Do not require wayland-protocols as dependency in the .pc files

See merge request GNOME/gtk!3960

4 years agoDo not require wayland-protocols as dependency in the .pc file
muradm [Thu, 16 Sep 2021 14:53:00 +0000 (17:53 +0300)]
Do not require wayland-protocols as dependency in the .pc file

Basically, I was building some packages on Guix. I figured out that
wayland-protocols was listed among propagated-inputs for gtk+ package
(gtk-3-24). propagated-inputs holds a list of runtime dependencies,
that should be available to any other package that depends on gtk+.
While discussing we clarified that wayland-protocols is not runtime
dependency. So I moved it to native-inputs of gtk+ package, which
means that, this dependency will be available only to gtk+ package and
only at build time. Once moved, building of other applications that
depening on gtk+ started to fail.

Investigation showed that, all .pc (pkg-config) files prepared by gtk+
package, was including:

Requires.private: ... wayland-protocols ...

Since it becomes requirement, other applications was failing with
missing dependency wayland-protocols of dependency gtk+, for instance:

-- Checking for module 'gtk+-3.0'
--   Package 'wayland-protocols', required by 'gdk-3.0', not found

While actually wayland-protocols is not even a build time dependency
of application that depends on gtk+. Advertisement of such
requirement, is a bit misleading, because one does not need it at
runtime, especially applications based on gtk.

4 years agoMerge branch 'wip/jimmac/make-toolbar-togglebuttons-visible' into 'master'
Matthias Clasen [Thu, 16 Sep 2021 11:35:35 +0000 (11:35 +0000)]
Merge branch 'wip/jimmac/make-toolbar-togglebuttons-visible' into 'master'

theme: make toggled tbuttons in toolbars visible

Closes #4264

See merge request GNOME/gtk!3959

4 years agotheme: make toggled tbuttons in toolbars visible
Jakub Steiner [Thu, 16 Sep 2021 10:47:26 +0000 (12:47 +0200)]
theme: make toggled tbuttons in toolbars visible

- do what Alex does in libadwaita

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4264

4 years agoMerge branch 'misc-texture-things' into 'master'
Matthias Clasen [Thu, 16 Sep 2021 03:14:12 +0000 (03:14 +0000)]
Merge branch 'misc-texture-things' into 'master'

Add gdk_texture_new_from_bytes

See merge request GNOME/gtk!3958

4 years agopixbufutils: Simplify function
Benjamin Otte [Tue, 14 Sep 2021 16:17:44 +0000 (18:17 +0200)]
pixbufutils: Simplify function

4 years agotexture: Mention download_float in the docs
Matthias Clasen [Tue, 14 Sep 2021 12:38:25 +0000 (08:38 -0400)]
texture: Mention download_float in the docs

4 years agoAdd gdk_texture_new_from_bytes
Matthias Clasen [Mon, 13 Sep 2021 17:30:12 +0000 (13:30 -0400)]
Add gdk_texture_new_from_bytes

Add this new api, and make gdk_texture_new_from_file
a wrapper around it.

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 16 Sep 2021 01:56:39 +0000 (01:56 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Fix memorytexture float conversion

See merge request GNOME/gtk!3957

4 years agongl: Avoid cairo_to_png in debug output
Matthias Clasen [Tue, 14 Sep 2021 21:59:26 +0000 (17:59 -0400)]
ngl: Avoid cairo_to_png in debug output

Just use a GL texture and gdk_texture_save_to_png,
it was made for this.

4 years agoFix memorytexture float conversion
Matthias Clasen [Wed, 15 Sep 2021 04:27:32 +0000 (00:27 -0400)]
Fix memorytexture float conversion

This was silently dropping the alpha in one case.

4 years agoMerge branch 'update-readme' into 'master'
Matthias Clasen [Wed, 15 Sep 2021 23:25:57 +0000 (23:25 +0000)]
Merge branch 'update-readme' into 'master'

Update the README

See merge request GNOME/gtk!3956

4 years agoApply 1 suggestion(s) to 1 file(s)
Matthias Clasen [Wed, 15 Sep 2021 21:50:36 +0000 (21:50 +0000)]
Apply 1 suggestion(s) to 1 file(s)

4 years agoUpdate the README
Matthias Clasen [Wed, 15 Sep 2021 19:08:13 +0000 (15:08 -0400)]
Update the README

Remove the mention of GNU (since that has not been case
for a long time, effectively), state that GTK is hosted
by the GNOME project, and point to GNOME as a place
for donations.

4 years agoUpdate Chinese (China) translation
Boyuan Yang [Wed, 15 Sep 2021 18:41:06 +0000 (18:41 +0000)]
Update Chinese (China) translation